#include"common.h"
int TestGetMetaData(const char*filename){
    AVFormatContext *fmt_ctx = NULL;
    AVDictionaryEntry *tag = NULL;
    int ret;     
    av_register_all();
    if ((ret = avformat_open_input(&fmt_ctx, filename, NULL, NULL)))
        return ret;
    
    while ((tag = av_dict_get(fmt_ctx->metadata, "", tag, AV_DICT_IGNORE_SUFFIX)))
        printf("%s=%s\n", tag->key, tag->value);
    
    avformat_close_input(&fmt_ctx);
    return 0;
}